Returns the type of a file or directory.
The return value is based on the file type defined in the system registry for the corresponding file extension. For example, the type for a file with a .docx extension is 'Microsoft Word Document' and the type for a directory is 'File Folder'.
If a file extension is not defined in the registry, the extension is returned as the file type. For example, the file type for test.abc is returned as 'ABC File'.
Syntax
FileType("FilePath")
Arguments
| Argument | Description |
|---|---|
| FilePath | Full path to the file or directory. See Identifying files and directories in statements for information about configuring full paths relative to the workspace or script directory. |
Return value
| Value | Description |
|---|---|
| Value | File or directory type based on the system registry. |
| <Extension> File | File extension is not associated with a file type in the registry. |
Example
FileType("C:\\Testing\\Output.txt")